/* MAIN.C file
 * 
 * Copyright (c) 2002-2005 STMicroelectronics
 */

#include "stm8s.h"

void main()
{
	GPIO_Init(GPIOA, GPIO_PIN_3, GPIO_MODE_OUT_PP_LOW_SLOW);
	GPIO_WriteLow(GPIOA, GPIO_PIN_3);
	
	TIM1_DeInit();
	TIM1_TimeBaseInit(0, TIM1_COUNTERMODE_UP, 65535, 0);
	TIM1_ITConfig(TIM1_IT_UPDATE, ENABLE);
	
	enableInterrupts();
	TIM1_Cmd(ENABLE);
	while (1);
}